<template>
  <div class="page-container " v-loading="loading" v-loadingCommonStyle>

    <ex_header_spiler :title="$tt('label_base_info')" />
    <ex_super_desc v-bind="baseOption" :data="form" :attrs="$defaultDetailDescAttrs" />
    <ex_header_spiler :title="$tt('label_warehouse_info')" />
    <ex_super_desc v-bind="warehouseOption" :data="form" :attrs="$defaultDetailDescAttrs" />
    <ex_header_spiler :title="$tt('label_transport_info')" />
    <ex_super_desc v-bind="logisticsOption" :data="form" :attrs="$defaultDetailDescAttrs" />
    <ex_header_spiler :title="$tt('label_value_add_service')" />
    <ex_super_desc v-bind="serviceOption" :data="form" :attrs="$defaultDetailDescAttrs" />

    <template v-if="form.inboundOrderSkuList && form.inboundOrderSkuList.length">
      <ex_header_spiler :title="$tt('label_sku_specification')">
      </ex_header_spiler>
      <ex_super_table v-bind="skuTableOption" :data="form.inboundOrderSkuList" size="default" height="300" />
    </template>

    <ex_header_spiler :title="$tt('label_box_specification')" />
    <ex_super_table v-bind="skuOption" :data="form.detailList" size="default" height="400">
    </ex_super_table>
    <ex_header_spiler :title="$tt('label_operate_record')" />
    <ex_super_table v-bind="recordOption" :data="form.operateRecord" size="default" height="300">
    </ex_super_table>
  </div>
</template>

<script>

import router_params from '@/mixin/router_params';
export default {
  title: "title_overseas_inbound_detail",
  components: {},
  mixins: [router_params],
  data() {
    return {
      loading: false,
      form: {},
      baseOption: {
        model: [
          { key: 'code', label: 'label_inbound_code' },
          { key: 'receivingOrderCode', label: 'label_inbound_order_code' },
          { key: 'customerName', label: 'label_customer_info', formatter: (r, c, v) => this.$formatNameCode(v, r.customerCode) },
          { key: 'inboundType', label: 'label_inbound_type', formatter: (r, c, v) => this.$enumShow(v, "InboundTypeEnum") },
          // { key: 'deliveryType', label: 'label_delivery_type', formatter: (r, c, v) => this.$enumShow(v, "DeliveryTypeEnum") },
          // { key: 'deliveryMode', label: '自送方式', formatter: (r, c, v) => this.$enumShow(v, "DeliveryModeEnum") },


          { key: 'bizType', label: 'label_business_type', formatter: (r, c, v) => this.$enumShow(v, "BizTypeEnum") },

          {
            key: 'destinationWarehouseName', label: 'label_destination_warehouse',
            formatter: (r, c, v) => this.$formatNameCode(v, r.destinationWarehouseCode)
          },

          // { key: 'collectionType', label: 'label_collect_goods_type', formatter: (r, c, v) => this.$enumShow(v, "CollectionTypeEnum") },

          { key: 'platformCode', label: 'label_platform_no' },

          { key: 'declaredAmount', label: 'label_declared_value' },

          { key: 'isInvalid', label: 'label_is_invalid', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },


          { key: 'description', label: 'label_remark' },


          { key: 'status', label: 'label_inbound_status', formatter: (r, c, v) => this.$enumShow(v, "OverseasStatusEnum") },

          { key: 'isPallet', label: 'label_has_pallet', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },
          { key: 'isCustomerPallet', label: 'label_has_customer_pallet', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },

          {
            key: 'boxDetailIsEmpty', label: 'label_require_sku_detail_manage', 'width': 120,
            render: (h, { data, item }) => {
              const v = data[item.key]
              return (<div class={v == 'Y' ? 'color_danger' : 'color_success'}>{this.$enumShow(v, "YesOrNoOppositeEnum")}</div>)
            }

          },
          {
            key: 'boxIsEmpty', label: 'label_is_box_code_manage', 'width': 120,
            render: (h, { data, item }) => {
              const v = data[item.key]
              return (<div class={v == 'Y' ? 'color_danger' : 'color_success'}>{this.$enumShow(v, "YesOrNoOppositeEnum")}</div>)
            }
          },
          // { key: 'isWarehouseEdit', label: '是否仓库编辑', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },

          // { key: 'isUploadTrackingNumber', label: 'label_is_upload_track_code', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },

          { key: 'expectPalletQty', label: 'label_expected_pallet_number' },
          { key: 'expectPackagingQty', label: 'label_expected_pack_number' },
          { key: 'expectBoxQty', label: 'label_expected_box_number' },
          { key: 'expectSkuQty', label: 'label_expected_sku_number' },


          {
            key: 'totalWeight', label: 'label_expected_total_weight', render: (h, { data, item }) => this.$renderText(h, this.$addUnit(data[item.key], 'kg')),
          },
          {
            key: 'totalVolume', label: 'label_expected_total_volume', render: (h, { data, item }) => this.$renderText(h, this.$addUnit(data[item.key], 'm³')),

          },
          {
            key: 'totalDensity', label: 'label_expected_total_density', render: (h, { data, item }) => this.$renderText(h, this.$addUnit(data[item.key], 'kg/m³')),
          },
          {
            key: 'measureOrderWeight', label: 'label_transit_measure_total_weight', render: (h, { data, item }) => this.$renderText(h, this.$addUnit(data[item.key], 'kg')),
          },
          {
            key: 'measureOrderVolume', label: 'label_transit_measure_total_volume', render: (h, { data, item }) => this.$renderText(h, this.$addUnit(data[item.key], 'm³')),
          },
          {
            key: 'measureOrderDensity', label: 'label_transit_measure_total_density', render: (h, { data, item }) => this.$renderText(h, this.$addUnit(data[item.key], 'kg/m³')),
          },

          // { key: 'isPickingTask', label: 'label_is_exist_pick_task', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },
          // { key: 'pickingTaskUserName', label: 'label_pick_task_user', formatter: (r, c, v) => this.$formatNameCode(v, r.pickingTaskUserCode) },

          // { key: 'pickingStatus', label: 'label_pick_status', formatter: (r, c, v) => this.$enumShow(v, "PickingStatusEnum") },
          // { key: 'pickingTime', label: 'label_pick_date', formatter: (r, c, v) => this.$dateFormat(v) },

          // { key: 'pickingBoxQty', label: 'label_pick_box_count' },
          // { key: 'pickingSkuQty', label: 'label_pick_sku_count' },
          // { key: 'pickingUserName', label: 'label_pick_user', formatter: (r, c, v) => this.$formatNameCode(v, r.pickingUserCode) },





          // { key: 'isCheckoutTask', label: 'label_is_exist_checkout_task', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },
        ],
      },
      warehouseOption: {
        model: [
          { key: 'supplyName', label: 'label_logistics_supplier', },

          { key: 'isPackaging', label: 'label_is_pack', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },
          { key: 'isFirstArrival', label: 'label_is_first_arrival', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },


          { key: 'isReceivingTask', label: 'label_is_exist_receiving_task', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },
          // { key: 'receivingTaskUserName', label: 'label_receiving_task_user', formatter: (r, c, v) => this.$formatNameCode(v, r.receivingTaskUserCode) },

          { key: 'receivingStatus', label: 'label_receiving_status', formatter: (r, c, v) => this.$enumShow(v, "ReceivingStatusEnum") },
          { key: 'receivingTime', label: 'label_receiving_time', formatter: (r, c, v) => this.$dateFormat(v) },



          { key: 'receivingBoxQty', label: 'label_receiving_box_number' },
          { key: 'receivingSkuQty', label: 'label_receiving_number' },
          { key: 'receivingUserName', label: 'label_receiving_user', formatter: (r, c, v) => this.$formatNameCode(v, r.receivingUserCode) },
          { key: 'isResetReceiving', label: 'label_is_reset_receiving', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },
          { key: 'resetReceivingCount', label: 'label_reset_receiving_count' },


          { key: 'acceptanceStatus', label: 'label_acceptance_status', formatter: (r, c, v) => this.$enumShow(v, "AcceptanceStatusEnum") },

          { key: 'isPutawayTask', label: 'label_is_exist_put_task', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },
          // { key: 'putawayTaskUserName', label: 'label_putaway_task_user', formatter: (r, c, v) => this.$formatNameCode(v, r.putawayTaskUserCode) },

          { key: 'putawayStatus', label: 'label_putaway_status', formatter: (r, c, v) => this.$enumShow(v, "PutawayStatusEnum") },

          { key: 'putawayTime', label: 'label_putaway_time', formatter: (r, c, v) => this.$dateFormat(v) },

          { key: 'putawayBoxQty', label: 'label_putaway_box_number' },
          { key: 'putawaySkuQty', label: 'label_putaway_number' },
          { key: 'putawayUserName', label: 'label_putaway_user', formatter: (r, c, v) => this.$formatNameCode(v, r.putawayUserCode) },


          {
            key: 'isAutomaticWarehouseArea', label: 'label_is_auto_location', 'width': 110, 'show-overflow-tooltip': true,
            render: (h, { data, item }) => this.$renderText(h, data[item.key], { enum: "YesOrNoEnum" })
          },

        ],
      },
      logisticsOption: {
        model: [
          { key: 'productName', label: 'label_logistics', formatter: (r, c, v) => this.$formatNameCode(v, r.productCode) },
          {
            key: 'transitWarehouseName', label: 'label_transit_warehouse', if: () => this.inboundTypeTRANSIT,
            formatter: (r, c, v) => this.$formatNameCode(v, r.transitWarehouseCode)
          },
          {
            key: 'expectedDate', label: 'label_expected_arrival_date', if: () => this.inboundTypeDIRECT,
            formatter: (r, c, v) => this.$dateFormat(v)
          },
          { key: 'mainTrackingNumber', label: 'label_customer_track_code', if: () => this.inboundTypeDIRECT, },

        ],
      },

      serviceOption: {
        model: [
          { key: 'customsService', label: 'label_customs_service', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },
          { key: 'customsType', label: 'label_customs_type', formatter: (r, c, v) => this.$enumShow(v, "CustomsTypeEnum") },
          { key: 'isInsurance', label: 'label_insurance_server', formatter: (r, c, v) => this.$enumShow(v, "YesOrNoEnum") },
          { key: 'insuranceValue', label: 'label_insurance_amount', },

        ],
      },
      skuTableOption: {
        attrs: { stripe: true, },
        defaultColAttr: {
          align: 'left',
        },
        model: [
          { key: 'skuName', label: 'label_sku_info', 'min-width': 120, 'show-overflow-tooltip': true, },
          {
            key: 'skuBarcode', label: 'label_sku_code', 'min-width': 120, 'show-overflow-tooltip': true,
            propertyFilter: true, sortable: true,
          },
          {
            key: 'skuOnlyCode', label: 'label_sku_only_code', 'min-width': 220,
            propertyFilter: true, sortable: true,
            render: (h, { row, column }) => {
              const code = row[column.property]
              if (!code) return this.$tt('data_temp_none')
              return (<text_extra_tooltip_operate
                value={code}
                data_type={column.property} data_id={row.boxId}
                extra_barcode_image={true} extra_text_align='center'
              />)
            },
          },
          {
            key: 'skuDeclaredAmount', label: 'label_declared_value',
            sortable: true,
            formatter: (r, c, v) => this.$formatNameCode(v, r.currencyCode)
          },
          {
            key: 'insuredAmount', label: 'label_insurance_amount', 'min-width': 120,
            sortable: true,
            formatter: (r, c, v) => r.isInsurance == 'N' ? this.$tt('data_none') : this.$formatNameCode(v, r.currencyCode),
          },
          {
            key: 'quantity', label: 'label_inbound_count', 'min-width': 110,
            sortable: true,
          },
          {
            key: 'packingBoxQty', label: 'label_packbox_count', 'min-width': 110,
            sortable: true,
          },
          {
            key: 'receivingQty', label: 'label_receiving_number', 'min-width': 110,
            sortable: true,
          },
          {
            key: 'acceptanceQty', label: 'label_acceptance_number', 'min-width': 110,
            sortable: true,
          },
        ],
      },
      skuOption: {
        model: [
          {
            key: 'palletNo', label: 'label_pallet_code', 'min-width': 150, if: () => this.IsPALLET,
            propertyFilter: true, sortable: true,
            width: 100,
          },
          {
            key: 'boxNo', label: 'label_box_code', 'min-width': 150,
            propertyFilter: true, sortable: true,
            render: (h, { row, column }) => {
              const code = row[column.property]
              if (!code) return this.$tt('data_temp_none')
              return (<text_extra_tooltip_operate
                value={code}
                data_type={column.property} data_id={row.boxId}
                extra_barcode_image={true} extra_text_align='center'
              />)
            },
          },
          { key: 'isMeasure', label: 'label_box_is_measure', width: 100, sortable: true, attrs: { formatter: (r, c, v, i) => this.$enumShow(v, "YesOrNoEnum") } },
          { key: 'isMixed', label: 'label_box_is_mixed', width: 100, sortable: true, attrs: { formatter: (r, c, v, i) => this.$enumShow(v, "YesOrNoEnum") } },
          { key: 'isPackaging', label: 'label_is_pack', width: 100, sortable: true, attrs: { formatter: (r, c, v, i) => this.$enumShow(v, "YesOrNoEnum") } },

          { key: 'isFirstArrival', label: 'label_is_first_arrival', width: 100, sortable: true, attrs: { formatter: (r, c, v, i) => this.$enumShow(v, "YesOrNoEnum") } },


          { key: 'quantity', label: 'label_expected_sku_number', width: 100, sortable: true, },
          { key: 'receivingQty', label: 'label_receiving_number', width: 100, sortable: true, },
          { key: 'acceptanceQty', label: 'label_acceptance_number', width: 100, sortable: true, },
          // { key: 'checkoutQty', label: 'label_checkout_sku_count', width: 100, sortable: true,},
          {
            key: 'skuBarcode', label: 'label_sku_code', 'min-width': 140,
            propertyFilter: true, sortable: true,
            render: (h, { row, column }) => {
              const code = row[column.property]
              if (!code) return this.$tt('data_temp_none')
              return (<text_extra_tooltip_operate
                value={code}
                data_type={column.property} data_id={row.boxId}
                extra_barcode_image={true} extra_text_align='center'
              />)
            },
          },
          {
            key: 'skuOnlyCode', label: 'label_sku_only_code', 'min-width': 140,
            propertyFilter: true, sortable: true,
            render: (h, { row, column }) => {
              const code = row[column.property]
              if (!code) return this.$tt('data_temp_none')
              return (<text_extra_tooltip_operate
                value={code}
                data_type={column.property} data_id={row.boxId}
                extra_barcode_image={true} extra_text_align='center'
              />)
            },
          },

          {
            key: 'packageNo', label: 'label_package_code', 'min-width': 150,
            propertyFilter: true, sortable: true,
            render: (h, { row, column }) => {
              const code = row[column.property]
              if (!code) return this.$tt('data_temp_none')
              return (<text_extra_tooltip_operate
                value={code}
                data_type={column.property} data_id={row.boxId}
                extra_barcode_image={true} extra_text_align='center'
              />)
            },
          },
          {
            key: 'skuName', label: 'label_sku_name', width: 120, 'show-overflow-tooltip': true,
            formatter: (r, c, v, i) => this.$formatNameCode(v, r.skuNameEn)
          },
          { key: 'insuredAmount', label: 'label_single_sku_insurance_amount', width: 100, sortable: true, },

          { key: 'receivingStatus', label: 'label_receiving_status', width: 120, 'show-overflow-tooltip': true, attrs: { formatter: (r, c, v, i) => this.$enumShow(v, "ReceivingStatusEnum") } },

          { key: 'temporaryAreaCode', label: 'label_receiving_warehouse_area', width: 110, },

          { key: 'temporaryLocationCode', label: 'label_receiving_warehouse_location', width: 120, },
          {
            key: 'receivingUserName', label: 'label_receiving_user', width: 100, 'show-overflow-tooltip': true,
            formatter: (r, c, v, i) => this.$formatNameCode(v, r.receivingUserCode)
          },

          { key: 'acceptanceStatus', label: 'label_acceptance_status', width: 120, 'show-overflow-tooltip': true, attrs: { formatter: (r, c, v, i) => this.$enumShow(v, "AcceptanceStatusEnum") } },

          { key: 'putawayStatus', label: 'label_putaway_status', width: 120, 'show-overflow-tooltip': true, attrs: { formatter: (r, c, v, i) => this.$enumShow(v, "PutawayStatusEnum") } },
          { key: 'putawayQty', label: 'label_putaway_number', width: 100, sortable: true, },

          // { key: 'pickingStatus', label: 'label_pick_status', width: 120, 'show-overflow-tooltip': true, attrs: { formatter: (r, c, v, i) => this.$enumShow(v, "PickingStatusEnum") } },
          // { key: 'pickingQty', label: 'label_pick_sku_count', width: 100,sortable: true, },

          {
            key: 'putawayLocationCode', label: 'label_putaway_warehouse_location', 'min-width': 200,
            render: (h, { row }) => {
              if (_.isEmpty(row.boxDetailLocationList)) return ""
              //【{item.putawayAreaCode}】
              const detail = (<div>{
                row.boxDetailLocationList.map(item =>
                  (<div>【{item.putawayAreaCode}】【{item.putawayLocationCode}】 → (<span class="bold color_success">{item.putawayQty}</span>) → ({this.$formatNameCode(item.putawayUserName, item.putawayUserCode)})</div>))
              }</div>)

              if (row.boxDetailLocationList.length > 1) {
                return (<el-popover
                  placement="top"
                  width="400"
                  trigger="hover"
                >
                  {detail}
                  <el-button slot="reference" type="text">{this.$tt('label_putaway_warehouse_location')}</el-button>
                </el-popover>)
              }
              return detail
            }
          },




          {
            label: 'label_filing_dimension', 'width': 220, render: (h, { row }) => {
              const item = row
              if ([item.skuWeight, item.skuLength, item.skuWidth, item.skuHeight].every(it => !it)) return this.$tt('data_temp_none')
              return (<div>
                <div>{this.$tt("label_weight") + " : "}{this.$renderText(h, this.$addUnit(this.$formatDigit(item.skuWeight, 3), "kg"))}</div>
                <div>{this.$tt("label_length") + " : "}{this.$renderText(h, this.$addUnit(this.$formatDigit(item.skuLength, 2), "cm"))}</div>
                <div>{this.$tt("label_width") + " : "}{this.$renderText(h, this.$addUnit(this.$formatDigit(item.skuWidth, 2), "cm"))}</div>
                <div>{this.$tt("label_height") + " : "}{this.$renderText(h, this.$addUnit(this.$formatDigit(item.skuHeight, 2), "cm"))}</div>


              </div>)
            }
          },
          {
            label: 'label_check_dimension', 'width': 220, render: (h, { row }) => {
              const item = row
              if ([item.checkSkuWeight, item.checkSkuLength, item.checkSkuWidth, item.checkSkuHeight].every(it => !it)) return this.$tt('data_temp_none')
              return (<div>
                <div>{this.$tt("label_weight") + " : "}{this.$renderText(h, this.$addUnit(this.$formatDigit(item.checkSkuWeight, 3), "kg"))}</div>
                <div>{this.$tt("label_length") + " : "}{this.$renderText(h, this.$addUnit(this.$formatDigit(item.checkSkuLength, 2), "cm"))}</div>
                <div>{this.$tt("label_width") + " : "}{this.$renderText(h, this.$addUnit(this.$formatDigit(item.checkSkuWidth, 2), "cm"))}</div>
                <div>{this.$tt("label_height") + " : "}{this.$renderText(h, this.$addUnit(this.$formatDigit(item.checkSkuHeight, 2), "cm"))}</div>
              </div>)
            }
          },
          {
            key: 'skuUrl', label: 'label_sku_image', 'width': 120,
            render: (h, { row }) => (<ex_image_view class="page_table_image" src={row.skuUrl} lazy fit="fill" preview-src-list={this.skuUrlList} />)
          },

        ],
      },
      recordOption: {
        model: [
          {
            key: 'process', label: 'label_operate_process', 'min-width': 150, flxed: 'left',
            attrs: { formatter: (r, c, v, i) => this.$tt(v) }
          },
          {
            key: 'status', label: 'label_operate_status', 'min-width': 150, flxed: 'left',
            attrs: { formatter: (r, c, v, i) => r.statusText || this.$enumShow(v, r.statusEnum) }
          },
          {
            key: 'planBoxCount', label: 'label_plan_box_number', width: 100,
          },
          { key: 'planSkuCount', label: 'label_plan_sku_number', width: 100, },
          {
            key: 'actualBoxCount', label: 'label_actual_box_number', width: 100,
            render: (h, { row, column }) => this.$renderText(h, row[column.property]),
            // formatter: (r, c, v, i) => r.run ? v : this.$tt("data_temp_none")
          },
          {
            key: 'actualSkuCount', label: 'label_actual_sku_number', width: 100,
            render: (h, { row, column }) => this.$renderText(h, row[column.property]),
            // formatter: (r, c, v, i) => r.run ? v : this.$tt("data_temp_none")
          },
          {
            key: 'operateUser', label: 'label_operate_user', 'min-width': 140,
            render: (h, { row, column }) => this.$renderText(h, row[column.property]),
            // formatter: (r, c, v, i) => r.run ? v : this.$tt("data_temp_none")
          },
          {
            key: 'operateTime', label: 'label_operate_time', 'width': 150,
            render: (h, { row, column }) => this.$renderText(h, this.$dateFormat(row[column.property])),
            // formatter: (r, c, v, i) => r.run ? this.$dateFormat(v) : this.$tt("data_temp_none")
          },

        ],
      },
    }
  },
  computed: {
    IsPALLET() {
      return this.form.isPallet == "Y"
    },
    TOB() {
      return this.form.bizType == 'TOB'
    },

    inboundTypeTRANSIT() {
      return this.form.inboundType == 'TRANSIT'
    },
    inboundTypeDIRECT() {
      return this.form.inboundType == 'DIRECT'
    },
    //交货方式-揽收
    deliveryTypeCOLLECT() {
      return this.inboundTypeTRANSIT && this.form.deliveryType == 'COLLECT'
    },
    deliveryTypeDELIVERY() {
      return this.inboundTypeTRANSIT && this.form.deliveryType == 'DELIVERY'
    },

    deliveryModeSelfDelivery() {
      return this.deliveryTypeDELIVERY && this.form.deliveryMode == 'DELIVERY'
    },
    deliveryModeLogistics() {
      return this.deliveryTypeDELIVERY && this.form.deliveryMode == 'LOGISTICS'
    },
  },
  methods: {

    init_data_default(into_params) {
      if (into_params.id) {
        this.loading = true
        this.$ajax({
          url: "/wms-api/inbound/WmsInboundOverseasInboundOrderRpc/selectDetail.json",
          method: 'post',
          data: { id: into_params.id },
          success: (res) => {
            if (!_.isEmpty(res.data.inboundOrderSkuList) && !_.isEmpty(res.data.detailList)) {
              const checks = res.data.inboundOrderSkuList.filter(it => it.checkSkuLength && it.checkSkuWidth && it.checkSkuHeight && it.checkSkuWeight)
              if (!_.isEmpty(checks)) {
                res.data.detailList.filter(it => !it.checkSkuLength && !it.checkSkuWidth && !it.checkSkuHeight && !it.checkSkuWeight).forEach(it => {
                  const item = _.find(checks, t => t.skuId == it.skuId)
                  if (item) {
                    it.checkSkuLength = item.checkSkuLength
                    it.checkSkuWidth = item.checkSkuWidth
                    it.checkSkuHeight = item.checkSkuHeight
                    it.checkSkuWeight = item.checkSkuWeight
                  }
                })
              }

            }


            this.form = Object.assign({}, res.data)
            this.fixTabLabel()



            const run_overseas_acceptance = this.form.acceptanceStatus != 'NOT_ACCEPTANCE'
            const orderOption = [
              {
                process: "label_create_order",
                statusText: this.$t('label_success'),
                run: true,
                planBoxCount: this.form.expectBoxQty, planSkuCount: this.form.expectSkuQty,
                actualBoxCount: this.form.expectBoxQty, actualSkuCount: this.form.expectSkuQty,
                operateUser: this.form.creator,
                operateTime: this.form.gmtCreate,
              },
            ]
            const standardOption = [

              {
                process: "label_receiving", status: this.form.receivingStatus,
                statusEnum: "ReceivingStatusEnum",
                run: this.form.receivingStatus != 'NOT_RECEIVING',
                planBoxCount: this.form.expectBoxQty,
                planSkuCount: this.form.expectSkuQty,
                actualBoxCount: this.form.receivingBoxQty, actualSkuCount: this.form.receivingSkuQty,
                operateUser: this.$formatNameCode(this.form.receivingUserName, this.form.receivingUserCode, ""),
                operateTime: this.form.receivingTime,
              },
              {
                process: "label_acceptance", status: this.form.acceptanceStatus,
                statusEnum: "AcceptanceStatusEnum",
                run: run_overseas_acceptance,
                planBoxCount: this.form.receivingBoxQty,
                planSkuCount: this.form.receivingSkuQty,
                actualBoxCount: this.form.acceptanceBoxQty, actualSkuCount: this.form.acceptanceSkuQty,
                operateUser: this.$formatNameCode(this.form.acceptanceUserName, this.form.acceptanceUserCode, ""),
                operateTime: this.form.acceptanceTime,
              },
              {
                process: "label_putaway", status: this.form.putawayStatus,
                statusEnum: "PutawayStatusEnum",
                run: this.form.putawayStatus != 'NOT_PUTAWAY',
                planBoxCount: this.form.expectPutawayBoxQty,
                planSkuCount: this.form.expectPutawaySkuQty,
                actualBoxCount: this.form.putawayBoxQty, actualSkuCount: this.form.putawaySkuQty,
                operateUser: this.$formatNameCode(this.form.putawayUserName, this.form.putawayUserCode, ""),
                operateTime: this.form.putawayTime,
              },
            ]
            this.form.operateRecord = [...orderOption, ...standardOption]
          },
          complete: () => {
            this.loading = false
          }
        })
      }
      this.fixTabLabel()
    },
    fixTabLabel() {
      if (!!this.form.code) {
        this.$emit("tagModifyLabel", {
          _key: 'label_name_code', i18n: { name: true }, name: "title_overseas_inbound_detail",
          code: this.form.code || ''
        })
      } else {
        this.$emit("tagModifyLabel", "title_overseas_inbound_detail")
      }
    },

  }
}
</script>
